package com.library.bookmanagement.exception;


import io.swagger.annotations.ApiModelProperty;

/**
 * @author ：ZXM
 * @date ：Created in 2020/5/26 16:29
 * @description：密码错误自定义异常类
 */
public class PasswordException extends RuntimeException {
    @ApiModelProperty(value = "状态码")
    private Integer code;

    @ApiModelProperty(value = "异常信息")
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public PasswordException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public PasswordException(String message, Integer code, String message1) {
        super(message);
        this.code = code;
        this.message = message1;
    }

    public PasswordException(String message, Throwable cause, Integer code, String message1) {
        super(message, cause);
        this.code = code;
        this.message = message1;
    }

    public PasswordException(Throwable cause, Integer code, String message) {
        super(cause);
        this.code = code;
        this.message = message;
    }

    public PasswordException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Integer code, String message1) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
        this.message = message1;
    }
}
